package net.ruixin.orm.hibernate;

import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Criterion;

import java.io.Serializable;
import java.util.List;

public abstract interface ISimpleHibernateTemplate<T, PK extends Serializable>
{
  public abstract void save(T paramT);

  public abstract void delete(T paramT);

  public abstract void delete(PK paramPK);

  public abstract List<T> findAll(OrderBy[] paramArrayOfOrderBy);

  public abstract Page<T> findAll(Page<T> paramPage);

  public abstract T get(PK paramPK);

  public abstract List find(String paramString, Object... paramArrayOfObject);

  public abstract Page<T> find(Page<T> paramPage, String paramString, Object... paramArrayOfObject);

  public abstract Object findUnique(String paramString, Object... paramArrayOfObject);

  public abstract Integer findInt(String paramString, Object... paramArrayOfObject);

  public abstract Long findLong(String paramString, Object... paramArrayOfObject);

  public abstract List<T> findByCriteria(Criterion[] paramArrayOfCriterion);

  public abstract Page<T> findByCriteria(Page paramPage, Criterion[] paramArrayOfCriterion);

  public abstract List<T> findByProperty(String paramString, Object paramObject, OrderBy[] paramArrayOfOrderBy);

  public abstract T findUniqueByProperty(String paramString, Object paramObject);

  public abstract Query createQuery(String paramString, Object... paramArrayOfObject);

  public abstract Criteria createCriteria(Criterion[] paramArrayOfCriterion);

  public abstract boolean isPropertyUnique(String paramString, Object paramObject1, Object paramObject2);

  public abstract List findBySQL(String paramString, Object... paramArrayOfObject);

  public abstract void executeSQL(String paramString, Object... paramArrayOfObject);

  public abstract Session getSession();
}

